//
//  DetailTextView.swift
//  ShiZhe
//
//  Created by 陈卿伟 on 16/9/14.
//  Copyright © 2016年 陈卿伟. All rights reserved.
//

import UIKit

class DetailTextView: UITextView {
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    init(frame: CGRect, textContainer: NSTextContainer? ,font:String,size:CGFloat) {
        super.init(frame: frame, textContainer:nil)
        self.textColor = UIColor.blackColor()
        self.textAlignment = .Left
        self.backgroundColor = UIColor.clearColor()
        if font == "light"{
            self.font = BaseFunc.getPingFangFont(size)
        }else{
            self.font = UIFont(name: "Verdana-Bold", size: size*SCALEW)
        }
        
        self.editable = false//不可编辑
        self.selectable = true//可选择
        self.dataDetectorTypes = UIDataDetectorTypes.Link //只有网址加链接
    }
}
